/*matrix.h*/
#pragma once
#include <vector>
#include <iomanip>
#include <iostream>

using namespace std;

class Matrix {
private:
	int Row = 0;
	int Col = 0;
	vector<vector<double>> matrix;
	Matrix LDLdecom();
public:
	void resize(int row, int col);
	void setblock(int rsta, int csta, int rsize, int csize, double* pBlock);
	double* operator[](int row) { return &this->matrix[row][0]; };
	int row();
	int col();
	Matrix operator*(const Matrix &mrig);	
	Matrix operator*(const double& num);
	void root(vector<double>pb, vector<double>&px);
	void printm(int n = 4);
	Matrix(int row, int col);
	Matrix(vector<double> v, bool div = false);
};